<template>
  <div class="cataAdd">
		<!-- 表单验证 -->
    <el-form :model="cata" :rules="rules" ref="cataAdd" label-width="100px" class="demo-ruleForm">
  <el-form-item label="分类名称" prop="cataName">
    <el-input v-model="cata.name"></el-input>
  </el-form-item>
  <el-form-item label="父级分类" prop="region">
    <el-select v-model="cata.pid" placeholder="请选择父级分类">
      <el-option
      v-for="cata in catas"
      :key="cata.id"
      :label="cata.name"
      :value="shanghai">

      </el-option>
      <el-option label="区域二" value="beijing"></el-option>
    </el-select>
  </el-form-item>
  <el-form-item>
    <el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
    <el-button @click="resetForm('ruleForm')">重置</el-button>
  </el-form-item>
</el-form>
    <!-- /表单验证 -->
  </div>
</template>

<script>
export default {
  props: {
    catas: {
      type: Array,
      required: true
    }

  },
  data () {
    return {
      cata: {
        name: '',
        pid: 0,
        usable: 1,
        icon: ''
      }
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
